<template>
	<div class="hot">
		<h2><span>TOP 10</span>热门文章</h2>
		<hr />
		<ul>
			<li v-for="(list,index) in res" :key="list.id">
				<router-link to="">
					<span :class="{ orange: index < 3}">{{ index + 1 }}</span>
					{{ list.title }}
				</router-link>

			</li>
		</ul>
	</div>
</template>

<script>
	let resData = [{
			"id": "1",
			"title": "php学科"
		},
		{
			"id": "2",
			"title": "这是第一篇文章"
		},
		{
			"id": "3",
			"title": "少走弯路，就看看这个贴"
		}, {
			"id": "4",
			"title": "前端必学框架bootsport，3天"
		}, {

			"id": "5",
			"title": "php学科进阶：要想提高php的编程效率"
		}, {

			"id": "6",
			"title": "最涨薪php项目——php微信公众平台开发"
		}

	]
	export default {
		data() {
			return {
				res: resData
			}
		}
	}
</script>

<style>
	.hot {
		background-color: #fff;
	}

	ul {
		padding: 0;
		list-style: none;
	}

	a {
		color: #000000;
		text-decoration: none;
	}

	.orange {
		color: orange;
	}
</style>
